<template>
  <view :style="themeColor">
    <view class="page">
      <view class="flex benben-position-layout flex flex-wrap align-center shenqingxiangqing_flex_0"
        :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
        <view class='flex flex-wrap align-center justify-between flex-sub shenqingxiangqing_fd0_0'>
          <view class='flex flex-wrap align-center shenqingxiangqing_fd0_0_c0' @tap.stop="handleJumpDiy"
            data-type="back" data-url="1">
            <text class='fu-iconfont2  shenqingxiangqing_fd0_0_c0_c0'>&#xE794;</text>
          </view>
          <view class='flex flex-wrap align-stretch justify-center'>
            <text class='shenqingxiangqing_fd0_0_c1_c0'>详情</text>
          </view>
          <view class='flex flex-wrap align-center justify-end shenqingxiangqing_fd0_0_c0' @tap.stop="handleJumpDiy"
            data-type="navigateTo" :data-url="`/pages/xtsz/kefu/kefu`">
            <image class='shenqingxiangqing_fd0_0_c2_c0' mode="aspectFit" :src='STATIC_URL+"151.png"'></image>
          </view>
        </view>

      </view>
      <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
      <!---flex布局flex布局开始-->
      <view class="flex flex-direction flex-wrap align-stretch benben-flex-layout">
        <view class='flex flex-wrap align-center self-center justify-between flex-sub shenqingxiangqing_fd1_0'>
          <view class='flex flex-direction align-stretch shenqingxiangqing_fd1_0_c0'>
            <text>{{info.order_status_name}}</text>
            <view v-if="leixing==1">
              <text class='shenqingxiangqing_fd1_0_c0_c1' v-if="info.order_status==0">等待雇主给最终答复</text>
              <text class='shenqingxiangqing_fd1_0_c0_c1' v-if="info.order_status==1">雇主已查看</text>
              <text class='shenqingxiangqing_fd1_0_c0_c1' v-if="info.order_status==3">雇主拒绝了这个申请</text>
            </view>
            <view v-if="leixing==0">
              <text class='shenqingxiangqing_fd1_0_c0_c1' v-if="info.order_status==0">雇主还没有给最终答复</text>
              <text class='shenqingxiangqing_fd1_0_c0_c1' v-if="info.order_status==1">雇主已查看</text>
              <text class='shenqingxiangqing_fd1_0_c0_c1' v-if="info.order_status==3">雇主拒绝了这个申请</text>
            </view>
          </view>
        </view>
      </view>

      <!---flex布局flex布局结束-->
      <!---flex布局flex布局开始-->
      <view class="flex benben-flex-layout flex-wrap align-center shenqingxiangqing_flex_2">
        <view class='flex flex-direction flex-wrap align-stretch shenqingxiangqing_fd2_0'>
          <view class='flex flex-direction flex-wrap align-stretch shenqingxiangqing_fd2_0_c0'>
            <text>申请信息</text>
            <view class='flex flex-direction flex-wrap align-stretch shenqingxiangqing_fd2_0_c0_c1'>
              <view class='flex flex-wrap align-center'>
                <text>{{info.xingming}}</text>
                <text class='shenqingxiangqing_fd2_0_c0_c1_c0_c1'>{{info.visatype_name}}</text>
              </view>
              <view class='flex flex-wrap align-center shenqingxiangqing_fd2_0_c0_c1_c1'
                @tap.stop="copyText(info.fangshizhi)">
                <text>{{info.lianxifangshi_name}}：{{info.fangshizhi}}</text>
                <text class='margin-left-sm shenqingxiangqing_fd2_0_c0_c1_c1_c1'>复制</text>
                <view class="text-red margin-top-sm text-weight-600">如果条件符合您的要求，请复制联系方式，与发布者沟通</view>
              </view>
            </view>
          </view>
          <!--          <view class='flex flex-direction flex-wrap align-stretch shenqingxiangqing_fd2_0_c1'>
            <text>特长/擅长技能</text>
            <text class='shenqingxiangqing_fd2_0_c1_c1'>{{info.techang}}</text>
          </view> -->
          <view class='flex flex-direction flex-wrap align-stretch shenqingxiangqing_fd2_0_c1'>
            <text>个人简历及工作技能</text>
            <text class='shenqingxiangqing_fd2_0_c1_c1'>{{info.gerenjianjie}}</text>
          </view>
        </view>
        <view class='flex flex-direction flex-wrap align-stretch shenqingxiangqing_fd2_1'>
          <view class='flex flex-wrap align-center justify-between shenqingxiangqing_fd2_1_c0' @tap.stop="handleJumpDiy"
            data-type="navigateTo" :data-url="`/pages/grzx/fabuxiangqing/fabuxiangqing?id=${zhaogonginfo.aid}`">
            <text>招工信息</text>
            <text class='shenqingxiangqing_fd2_0_c0_c1_c1_c1'>详情 ></text>
          </view>
          <view class='flex flex-wrap align-center self-center justify-between flex-sub'>
            <text class='shenqingxiangqing_fd2_1_c1_c0'>{{zhaogonginfo.zhiweimingcheng}}</text>
            <view class='flex flex-wrap align-center self-center'>
              <image class='shenqingxiangqing_fd2_1_c1_c1_c0' mode="aspectFit" :src='STATIC_URL+"150.png"'></image>
              <text class='shenqingxiangqing_fd2_1_c1_c1_c1'>{{zhaogonginfo.views}}</text>
            </view>
          </view>
          <view class='flex flex-wrap align-center shenqingxiangqing_fd2_1_c2'>
            <view class='flex flex-wrap align-center shenqingxiangqing_fd2_1_c2_c0'>
              <text>{{zhaogonginfo.worknature_name}}</text>
            </view>
            <view class='flex flex-wrap align-center shenqingxiangqing_fd2_1_c2_c1'
              v-for="(item,index) in zhaogonginfo.postcate_name" :key="index">
              <text>{{item}}</text>
            </view>

          </view>
          <view class='flex flex-wrap align-center shenqingxiangqing_fd2_1_c3'>
            <view>工作地点：
              <view class="margin-top-xs" v-for="(item,idnex) in zhaogonginfo.workplace_name" :key="idnex"> {{item}}
              </view>
            </view>
          </view>
          <view class='flex flex-wrap align-center justify-between shenqingxiangqing_fd2_1_c4'>
            <view class='flex flex-wrap align-center'>
              <image class='shenqingxiangqing_fd2_1_c4_c0_c0' mode="aspectFill" :src='zhaogonginfo.avatar'></image>
              <text class='shenqingxiangqing_fd2_1_c4_c0_c1'>{{zhaogonginfo.user_nickname}}</text>
            </view>
            <text>{{zhaogonginfo.gongsimingcheng}}</text>
          </view>
        </view>
      </view>

      <!---flex布局flex布局结束-->
      <benben-popup v-model="popupShow1710402255082" :mask="true" :mask-close-able="false" mode='center' :z-index='999'>
        <!---删除弹窗flex布局开始-->
        <view class="flex flex-direction flex-wrap align-center shenqingxiangqing_flex_3">
          <text class='shenqingxiangqing_fd3_0'>提示</text>
          <text class='shenqingxiangqing_fd3_1'>确认同意吗？</text>
          <view class='flex flex-wrap align-center shenqingxiangqing_fd3_2'>
            <button class='shenqingxiangqing_fd3_2_c0' @click="popupShow1710402255082=false">取消</button>
            <button class='shenqingxiangqing_fd3_2_c1' @click="apply">确认</button>
          </view>
        </view>

        <!---删除弹窗flex布局结束-->

      </benben-popup>
      <view class="flex flex-wrap align-center justify-end benben-position-layout flex shenqingxiangqing_flex_4">
        <view class='flex flex-wrap align-center justify-center shenqingxiangqing_fd4_0' @click="isReject=true"
          v-if="leixing==1&&info.order_status=='0'">
          <text>拒绝</text>
        </view>
        <view v-if="leixing==1&&info.order_status=='0'"
          class='flex flex-wrap align-center justify-center shenqingxiangqing_fd4_1'
          @click="popupShow1710402255082=true">
          <text>同意</text>
        </view>
        <view class='flex flex-wrap align-center justify-center shenqingxiangqing_fd4_1'
          v-if="info.order_status=='3' && leixing==1" @click="popupShow1710400273065=true">
          <text>删除</text>
        </view>
        <view class='flex flex-wrap align-center justify-center shenqingxiangqing_fd4_1'
          v-if="info.order_status=='3' && leixing==0" @click="popupShow1710400273065=true">
          <text>删除</text>
        </view>
      </view>
      <view :style="{height: '110rpx'}"></view>
      <benben-popup v-model="popupShow1710400273065" :mask="true" :mask-close-able="false" mode='center'>
        <!---删除弹窗flex布局开始-->
        <view class="flex flex-direction flex-wrap align-center shenqingxiangqing_flex_5">
          <text class='shenqingxiangqing_fd5_0'>提示</text>
          <text class='shenqingxiangqing_fd5_1'>确认删除吗？</text>
          <view class='flex flex-wrap align-center shenqingxiangqing_fd5_2'>
            <button class='shenqingxiangqing_fd5_2_c0' @click="popupShow1710400273065=false">取消</button>
            <button class='shenqingxiangqing_fd5_2_c1' @click="delP">确认</button>
          </view>
        </view>

        <!---删除弹窗flex布局结束-->

      </benben-popup>
      <benben-popup v-model="isReject" :mask="true" :mask-close-able="false" mode='center' :z-index='999'>
        <!---删除弹窗flex布局开始-->
        <view class="flex flex-direction flex-wrap align-center shenqingxiangqing_flex_3">
          <text class='shenqingxiangqing_fd3_0'>提示</text>
          <text class='shenqingxiangqing_fd3_1'>确认拒绝吗？</text>
          <view class='flex flex-wrap align-center shenqingxiangqing_fd3_2'>
            <button class='shenqingxiangqing_fd3_2_c0' @click="isReject=false">取消</button>
            <button class='shenqingxiangqing_fd3_2_c1' @click="jujue_apply">确认</button>
          </view>
        </view>

        <!---删除弹窗flex布局结束-->

      </benben-popup>


    </view>
  </view>
</template>
<script>
  export default {
    components: {},


    data() {
      return {
        "popupShow1710400273065": false,
        "popupShow1710402255082": false,
        "id": "",
        isReject: false,
        leixing: '',
        info: '',
        zhaogonginfo: ''
      };
    },
    computed: {
      themeColor() {
        return this.$store.getters.themeColor
      },

    },
    watch: {},
    onLoad(options) {
      let {
        id
      } = options
      if (id !== undefined) this.id = id
      this.$api.get(global.apiUrls.post5c78c4772da97, {}).then(res => {
        if (res.data.code == 1) {
          this.leixing = res.data.data.leixing
          this.getDeail()
          // this.leixing = 0
        }
      })
    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {

    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {

    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      jujue_apply() {
        this.$api.post(global.apiUrls.post65d84fbd6597c, {
          aid: this.id
        }).then(res => {
          if (res.data.code == 1) {
            this.isReject = false
            this.getDeail()
          } else {
            this.$message.info(res.data.msg)
          }
        })
      },
      apply() {
        this.$api.post(global.apiUrls.post65d85012478fc, {
          aid: this.id
        }).then(res => {
          if (res.data.code == 1) {
            this.popupShow1710402255082 = false
            this.getDeail()
          } else {
            this.$message.info(res.data.msg)
          }
        })
      },
      delP() {
        let urls = ''
        if (this.leixing == 1) {
          urls = global.apiUrls.post65d84c67a3fe2
        } else {
          urls = global.apiUrls.post65d84c67a3fe2
        }
        this.$api.post(urls, {
          aid: this.id
        }).then(res => {
          if (res.data.code == 1) {
            uni.navigateBack()
          } else {
            this.$message.info(res.data.msg)
          }
        })
      },
      getDeail() {
        this.$api.post(global.apiUrls.post65d845d9a2d8f, {
          aid: this.id
        }).then(res => {
          if (res.data.code == 1) {
            this.info = res.data.data
            this.getPost(this.info.userpost_id)
          }
        })
      },
      getPost(aid) {
        this.$api.post(global.apiUrls.post65d45803afa0d, {
          aid: aid
        }).then(res => {
          if (res.data.code == 1) {
            this.zhaogonginfo = res.data.data
          }
        })
      }
    }
  };
</script>
<style lang="scss" scoped>
  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: #F8F8F8;
    background-size: 100% auto;
  }

  .shenqingxiangqing_flex_0 {
    background: #fff;
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .shenqingxiangqing_fd0_0_c2_c0 {
    width: 40rpx;
    height: 40rpx;
  }

  .shenqingxiangqing_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 700;
    color: #333333;
    line-height: 50rpx;
  }

  .shenqingxiangqing_fd0_0_c0_c0 {
    font-size: 36rpx;
    color: #333;
  }

  .shenqingxiangqing_fd0_0_c0 {
    width: 120rpx;
  }

  .shenqingxiangqing_fd0_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
  }

  .shenqingxiangqing_fd1_0_c0_c1 {
    color: var(--benbenFontColor3);
    margin: 10rpx 0rpx 0rpx 0rpx;
    font-size: 24rpx;
  }

  .shenqingxiangqing_fd1_0_c0 {
    font-size: 32rpx;
    color: var(--benbenFontColor3);
  }

  .shenqingxiangqing_fd1_0 {
    background: var(--benbenbgColor3);
    background-size: 100% auto;
    padding: 20rpx 24rpx 100rpx 24rpx;
  }

  .shenqingxiangqing_flex_2 {
    position: relative;
    top: -60rpx;
  }

  .shenqingxiangqing_fd2_1_c4_c0_c1 {
    margin: 0rpx 0rpx 0rpx 24rpx;
  }

  .shenqingxiangqing_fd2_1_c4_c0_c0 {
    width: 68rpx;
    height: 68rpx;
    border-radius: 50%;
  }

  .shenqingxiangqing_fd2_1_c4 {
    color: rgba(119, 119, 119, 1);
    margin: 20rpx 0rpx 0rpx 0rpx;
  }

  .shenqingxiangqing_fd2_1_c3 {
    border-bottom: 1px solid var(--benbenbdColor7);
    font-size: 24rpx;
    color: rgba(153, 153, 153, 1);
    padding: 0rpx 0rpx 24rpx 0rpx;
  }

  .shenqingxiangqing_fd2_1_c2_c1 {
    background: var(--benbenbgColor0);
    background-size: 100% auto;
    padding: 4rpx 10rpx 4rpx 10rpx;
    color: var(--benbenFontColor0);
    margin: 0rpx 20rpx 0rpx 0rpx;
  }

  .shenqingxiangqing_fd2_1_c2_c0 {
    background: rgba(58, 135, 249, 0.6);
    background-size: 100% auto;
    padding: 4rpx 10rpx 4rpx 10rpx;
    color: var(--benbenFontColor3);
    margin: 0rpx 20rpx 0rpx 0rpx;
  }

  .shenqingxiangqing_fd2_1_c2 {
    margin: 20rpx 0rpx 20rpx 0rpx;
  }

  .shenqingxiangqing_fd2_1_c1_c1_c1 {
    color: rgba(102, 102, 102, 1);
  }

  .shenqingxiangqing_fd2_1_c1_c1_c0 {
    width: 32rpx;
    height: 32rpx;
    margin: 0rpx 20rpx 0rpx 0rpx;
  }

  .shenqingxiangqing_fd2_1_c1_c0 {
    font-size: 32rpx;
    color: #333;
    font-weight: 600;
  }

  .shenqingxiangqing_fd2_1_c0 {
    margin: 0rpx 0rpx 24rpx 0rpx;
  }

  .shenqingxiangqing_fd2_1 {
    background: var(--benbenbgColor1);
    background-size: 100% auto;
    padding: 24rpx;
    width: 720rpx;
    border-radius: 16rpx;
    margin: 10rpx auto 0rpx auto;
  }

  .shenqingxiangqing_fd2_0_c1_c1 {
    background: rgba(249, 249, 249, 1);
    font-size: 28rpx;
    color: rgba(102, 102, 102, 1);
    font-weight: 400;
    margin: 10rpx;
    background-size: 100% auto;
    padding: 20rpx;
  }

  .shenqingxiangqing_fd2_0_c1 {
    padding: 32rpx 0rpx 0rpx 0rpx;
  }

  .shenqingxiangqing_fd2_0_c0_c1_c1_c1 {
    color: var(--benbenFontColor4);
  }

  .shenqingxiangqing_fd2_0_c0_c1_c1 {
    font-size: 24rpx;
    color: rgba(119, 119, 119, 1);
    margin: 10rpx 0rpx 0rpx 0rpx;
  }

  .shenqingxiangqing_fd2_0_c0_c1_c0_c1 {
    border: 1px solid rgba(254, 164, 61, 1);
    background: rgba(254, 164, 61, 0.1);
    color: rgba(254, 164, 61, 1);
    font-size: 24rpx;
    background-size: 100% auto;
    border-radius: 8rpx;
    margin: 0rpx 0rpx 0rpx 24rpx;
    padding: 4rpx 10rpx 4rpx 10rpx;
  }

  .shenqingxiangqing_fd2_0_c0_c1 {
    background: rgba(249, 249, 249, 1);
    background-size: 100% auto;
    padding: 24rpx 0rpx 10rpx 24rpx;
    margin: 24rpx 0rpx 0rpx 0rpx;
  }

  .shenqingxiangqing_fd2_0_c0 {
    font-size: 28rpx;
    padding: 32rpx 0rpx 0rpx 0rpx;
  }

  .shenqingxiangqing_fd2_0 {
    background: var(--benbenbgColor1);
    background-size: 100% auto;
    width: 720rpx;
    margin: 0rpx auto 0rpx auto;
    border-radius: 16rpx;
    padding: 0rpx 20rpx 20rpx 20rpx;
  }

  .shenqingxiangqing_flex_3 {
    background: #fff;
    width: 540rpx;
    border-radius: 16rpx 16rpx 16rpx 16rpx;
  }

  .shenqingxiangqing_fd3_2_c1 {
    border-top: 1px solid #eee;
    border-left: 1px solid #eee;
    background: #fff;
    line-height: 110rpx;
    border-radius: 0rpx 0rpx 16rpx 0rpx;
    font-size: 32rpx;
    color: var(--benbenFontColor4);
    font-weight: 500;
    width: 270rpx;
  }

  .shenqingxiangqing_fd3_2_c0 {
    border-top: 1px solid #eee;
    background: #fff;
    line-height: 110rpx;
    border-radius: 0rpx 0rpx 0rpx 16rpx;
    font-size: 32rpx;
    color: rgba(153, 153, 153, 1);
    font-weight: 500;
    width: 270rpx;
  }

  .shenqingxiangqing_fd3_2 {
    margin: 37rpx 0rpx 0rpx 0rpx;
  }

  .shenqingxiangqing_fd3_1 {
    line-height: 52rpx;
    font-size: 32rpx;
    font-weight: 400;
    color: #333333;
    margin: 0rpx 32rpx 0rpx 32rpx;
    text-align: center;
  }

  .shenqingxiangqing_fd3_0 {
    font-size: 36rpx;
    font-weight: 700;
    line-height: 32rpx;
    color: #333333;
    margin: 40rpx 0rpx 40rpx 0rpx;
  }

  .shenqingxiangqing_flex_4 {
    background: var(--benbenbgColor1);
    width: 750rpx;
    height: 110rpx;
    overflow: hidden;
    z-index: 10;
    left: 0rpx;
    bottom: calc(0rpx + var(--window-bottom));
    background-size: 100% auto;
  }

  .shenqingxiangqing_fd4_1 {
    background: var(--benbenbgColor2);
    border-radius: 36rpx 36rpx 36rpx 36rpx;
    width: 200rpx;
    height: 72rpx;
    margin: 0rpx 24rpx 0rpx 24rpx;
    color: var(--benbenFontColor3);
  }

  .shenqingxiangqing_fd4_0 {
    background: #F8F8F8;
    border-radius: 36rpx 36rpx 36rpx 36rpx;
    width: 200rpx;
    height: 72rpx;
    margin: 0rpx 0rpx 0rpx 24rpx;
  }

  .shenqingxiangqing_flex_5 {
    background: #fff;
    width: 540rpx;
    border-radius: 16rpx 16rpx 16rpx 16rpx;
  }

  .shenqingxiangqing_fd5_2_c1 {
    border-top: 1px solid #eee;
    border-left: 1px solid #eee;
    background: #fff;
    line-height: 110rpx;
    border-radius: 0rpx 0rpx 16rpx 0rpx;
    font-size: 32rpx;
    color: var(--benbenFontColor4);
    font-weight: 500;
    width: 270rpx;
  }

  .shenqingxiangqing_fd5_2_c0 {
    border-top: 1px solid #eee;
    background: #fff;
    line-height: 110rpx;
    border-radius: 0rpx 0rpx 0rpx 16rpx;
    font-size: 32rpx;
    color: rgba(153, 153, 153, 1);
    font-weight: 500;
    width: 270rpx;
  }

  .shenqingxiangqing_fd5_2 {
    margin: 37rpx 0rpx 0rpx 0rpx;
  }

  .shenqingxiangqing_fd5_1 {
    line-height: 52rpx;
    font-size: 32rpx;
    font-weight: 400;
    color: #333333;
    margin: 0rpx 32rpx 0rpx 32rpx;
    text-align: center;
  }

  .shenqingxiangqing_fd5_0 {
    font-size: 36rpx;
    font-weight: 700;
    line-height: 32rpx;
    color: #333333;
    margin: 40rpx 0rpx 40rpx 0rpx;
  }
</style>
